package com.jkoa;

import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;

@UrlBinding("/logout")
public class LogoutActionBean extends BaseActionBean {
    @DefaultHandler
    public Resolution logout() {
        _logout();
        return new RedirectResolution(LoginActionBean.class);
//        return new JSP("simple_login.jsp");
    }

    private void _logout() {
        getContext().logout();
        addMessage("loggedOut");
    }
}